/*
 *
 * *******************************************************************
 *   @项目名称: BHex Android
 *   @文件名称: INDEX_TYPE.java
 *   @Date: 11/29/18 3:43 PM
 *   @Author: chenjun
 *   @Copyright（C）: 2018 BlueHelix Inc.   All rights reserved.
 *   注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的.
 *  *******************************************************************
 *
 */

package com.bhex.enums;



public enum INDEX_TYPE {
    INDEX_VOL(0, "VOL"),

    INDEX_MA(1, "MA"),
    INDEX_EMA(2, "EMA"),
    INDEX_BOLL(3, "BOLL"),

    INDEX_MACD(4, "MACD"),
    INDEX_KDJ(5, "KDJ"),
    INDEX_RSI(6, "RSI");

    public String mName;
    public int mType;

    INDEX_TYPE(int type, String name) {
        this.mType = type;
        this.mName = name;
    }

    public INDEX_TYPE getNameByType(int type) {
        for (INDEX_TYPE index_type : INDEX_TYPE.values()) {
            if (index_type.mType == type) {
                return index_type;
            }
        }
        return null;
    }
}
